package com.api.user.dao;

import com.api.core.ApiMapper;
import com.api.user.model.CouponUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface CouponUserMapper extends ApiMapper<CouponUser> {

    List<CouponUser> getByCouponId(@Param("couponId") Long couponId);

    List<CouponUser> getByUserIdAndCouponId(@Param("userId") Long userId,@Param("couponId") Long couponId);
    List<Map<String, Object>> getCouponByUserId(@Param("userId") Long userId, @Param("code")String code,@Param("order") Map<String, Object> orderParams);
}